Let's make the game end if the sprite collides with an enemy.
- Drag in a Collision with Other Sprite event. Change the name in the event handler to your sprite's name.
- Change my_var to name. Check if name is equal to "snake".
- If so, Remove the hit_sprite, Hide your character.
- Use Text to display "Game Over" on the stage.
To navigate the page using the TAB key, first press ESC to exit the code editor.